package strangeattractor.equations;

import static java.lang.Math.*;
import strangeattractor.core.DPoint;
import strangeattractor.core.Transformer;

public class Pickover implements Transformer {

	//IDEAL VALUE (1, 1.8, 0.71, 1.51)
	
	public double A, B, C, D;
	
	public Pickover(double a, double b, double c, double d) {
		super();
		A = a;
		B = b;
		C = c;
		D = d;
	}

	@Override
	public DPoint next(DPoint p) {
		double x = sin(A*p.y) + p.z*cos(B*p.x);
		double y = p.z*sin(C*p.x) + cos(D*p.y);
		double z = sin(p.x);
		return new DPoint(x, y, z);
	}

}
